package com.zhang.admin.controller;

import com.zhang.admin.service.LogService;
import com.zhang.common.core.po.admin.SysLog;
import com.zhang.common.core.vo.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author zsw
 * @Date 2019/11/9 23:04
 * @Version V1.0
 **/
@RestController
@RequestMapping("log")
@AllArgsConstructor
public class LogController {

    private final LogService logService;

    @PostMapping
    public Result<String> saveSysLog(@RequestBody SysLog sysLog){
        logService.saveSysLog(sysLog);
        return Result.success("创建日志成功");
    }

}